﻿<%@ Page Title="" Language="C#" MasterPageFile="~/List.Master" AutoEventWireup="true"
    CodeBehind="ButtonList.aspx.cs" Inherits="SGDemo.Permission.ButtonList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cpHeader" runat="server">
    <script src="ButtonList.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpBody" runat="server">
    <div class="ui-menu">
        <uc:Menu ID="menu1" runat="server" DataFile="../Views/Permission/Menu/ButtonList.xml"
            PageCode="ButtonList" />
    </div>
    <div class="ui-wrapper">
     <div class="ui-hidden">
            <dx:ASPxLabel ID="lblKeyid" ClientInstanceName="lblKeyid" runat="server" />
        </div>
        <div id="listall" style="width:980px" class="ui-content-item ui-content-item-selected">
            <table>
                <tr>
                    <td style="vertical-align: top; width: 127px">
                        <dx:ASPxComboBox ID="cbModule" ClientInstanceName="cbModule" runat="server" Width="160px">
                            <ClientSideEvents SelectedIndexChanged="doSelectItem" />
                        </dx:ASPxComboBox>
                    </td>
                    <td style="width: 10px">
                    </td>
                    <td rowspan="2" style="vertical-align: top; width:843px;">
                        <%--gvwList--%>
                        <dx:ASPxGridView ID="gvwList" ClientInstanceName="gvwList" runat="server" AutoGenerateColumns="False"
                            DataSourceForceStandardPaging="True" DataSourceID="odsList" Width="100%" KeyFieldName="Keyid"
                            OnCustomCallback="gvwList_CustomCallback">
                            <Columns>
                                   <dx:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0" HeaderStyle-HorizontalAlign="Center">
                                    <HeaderTemplate>
                                        <dx:ASPxCheckBox ID="cbSelectAll" runat="server">
                                                    <ClientSideEvents CheckedChanged="doSelectOrUnselectAll" />
                                        </dx:ASPxCheckBox>
                                    </HeaderTemplate>
                                </dx:GridViewCommandColumn>
                                <dx:GridViewDataColumn Caption="按钮名称" FieldName="ButtonName" VisibleIndex="1" Width="120">
                                </dx:GridViewDataColumn>
                                <dx:GridViewDataColumn Caption="按钮编码" FieldName="ButtonCode" VisibleIndex="2" Width="120">
                                </dx:GridViewDataColumn>
                                <dx:GridViewDataColumn Caption="按钮英语名称" FieldName="ButtonNameEn" VisibleIndex="3" Width="170">
                                </dx:GridViewDataColumn>
                                <dx:GridViewDataColumn Caption="图片路径" FieldName="ImageUrl" VisibleIndex="4">
                                </dx:GridViewDataColumn>
                                <dx:GridViewDataColumn Caption="排序" FieldName="Order" VisibleIndex="5">
                                </dx:GridViewDataColumn>
                                <dx:GridViewDataColumn Caption="备注" FieldName="Remark" VisibleIndex="6">
                                </dx:GridViewDataColumn>
                            </Columns>
                            <ClientSideEvents SelectionChanged="doSelectionChanged" RowDblClick="doRowDblClick" />
                            <SettingsBehavior AllowFocusedRow="true" />
                            <SettingsLoadingPanel Text="加载中..." />
                            <SettingsPager PageSize="30" >
                            </SettingsPager>
                            <SettingsText EmptyDataRow="没有数据显示" />
                        </dx:ASPxGridView>
                        <%--数据源控件--%>
                        <asp:ObjectDataSource ID="odsList" runat="server" SortParameterName="sortColumns"
                            EnablePaging="true" StartRowIndexParameterName="startRecord" MaximumRowsParameterName="maxRecords"
                            SelectCountMethod="PagingGetButtonCount" SelectMethod="PagingGetButton" TypeName="SGDemo.Permission.ButtonManage">
                            <SelectParameters>
                                <asp:ControlParameter Name="filterConditions" Type="String" ControlID="hfFilterCondition"
                                    PropertyName="Value" ConvertEmptyStringToNull="false" />
                            </SelectParameters>
                        </asp:ObjectDataSource>
                        <%--存储过滤条件--%>
                        <asp:HiddenField ID="hfFilterCondition" ClientIDMode="Static" runat="server" Value="1=2" />
                    </td>
                </tr>
                <tr>
                    <td style="width: 160px; vertical-align: top; padding-top:10px;">
                        <dx:ASPxTreeList ID="tlPageList" AutoGenerateColumns="False" Width="100%" ClientInstanceName="tlPageList"
                            KeyFieldName="Keyid" ParentFieldName="ParentKeyid" runat="server" OnCustomCallback="tlPageList_CustomCallback">
                            <Columns>
                                <dx:TreeListDataColumn Caption="页面管理" FieldName="PageName" VisibleIndex="0" Width="160px" />
                            </Columns>
                            <ClientSideEvents NodeDblClick="dbNodeClick" />
                            <SettingsPager Mode="ShowAllNodes"/>
                            <Styles>
                                <PagerTopPanel>
                                    <BorderBottom BorderStyle="Solid" />
                                </PagerTopPanel>
                                <PagerBottomPanel>
                                    <BorderTop BorderStyle="Solid" />
                                </PagerBottomPanel>
                                <AlternatingNode Enabled="true" />
                            </Styles>
                            <Settings GridLines="Both" />
                            <SettingsBehavior AllowFocusedNode="true" />
                        </dx:ASPxTreeList>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</asp:Content>
